/* Henar Sánchez Seco — portfolio */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
:root {
  --bg: #f3f0ea;
  --paper: #fbfaf7;
  --ink: #1b1a17;
  --muted: #67625a;
  --line: #d8d2c7;
  --dark: #161513;
  --sans: "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --pad: clamp(16px, 2.2vw, 32px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ol, ul { list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--ink); color: var(--bg); }

.skip { position: absolute; left: -9999px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[id] { scroll-margin-top: 72px; }
h2.eyebrow, h3.eyebrow { font-weight: 400; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.zoom { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; font: inherit; color: inherit; cursor: zoom-in; }
.zoom:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.inline-link { text-decoration: underline; text-underline-offset: 3px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.wrap { padding-inline: var(--pad); }
.eyebrow { font-size: 13px; letter-spacing: .02em; color: var(--muted); margin-bottom: 28px; }
.eyebrow--sm { margin: 48px 0 12px; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--pad);
  font-size: 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .4s var(--ease);
}
.nav.is-hidden { transform: translateY(-100%); }
.nav:focus-within { transform: none; }
.nav__brand { font-weight: 500; white-space: nowrap; }
.nav__links { display: flex; gap: clamp(14px, 2.4vw, 36px); }
.nav__links a, .back, .hero__scroll, .to-top { position: relative; display: inline-block; padding-block: 10px; margin-block: -10px; }
.nav__brand { padding-block: 10px; margin-block: -10px; }
.nav__links a::after, .hero__scroll::after, .back::after, .to-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .35s var(--ease);
}
.nav__links a:hover::after, .hero__scroll:hover::after, .back:hover::after, .to-top:hover::after { transform: scaleX(1); transform-origin: left; }

/* Hero */
.hero { padding: 104px var(--pad) 28px; }
.hero__name {
  font-weight: 500; font-size: clamp(64px, 14.2vw, 250px);
  line-height: .86; letter-spacing: -.055em; margin-left: -.04em;
}
.hero__line { display: block; }
.js .hero__line { opacity: 0; transform: translateY(40%); animation: rise 1.1s var(--ease) forwards; }
.js .hero__line:nth-child(2) { animation-delay: .12s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: clamp(28px, 5vw, 64px); }
.hero__role { max-width: 34ch; font-size: 15px; }
.hero__scroll { font-size: 15px; white-space: nowrap; }

/* Work grid */
.work { padding: 0 calc(var(--pad) / 2); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px calc(var(--pad) / 2); }
.card { display: block; }
.card__media { aspect-ratio: 4 / 5; overflow: hidden; background: #e6e1d8; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.card:hover .card__media img { transform: scale(1.035); }
.card__media.is-drawing { background: #fff; }
.card__media.is-drawing img { object-fit: contain; padding: 12%; }
.card__meta {
  display: grid; grid-template-columns: 44px 1fr auto; column-gap: 12px;
  padding: 14px 4px 0; font-size: 15px; align-items: baseline;
}
.card__num { color: var(--muted); font-size: 13px; }
.card__title { font-size: 15px; font-weight: 500; }
.card__cat { grid-column: 2; color: var(--muted); }
.card__year { grid-row: 1; grid-column: 3; color: var(--muted); }

.card__media.is-brand { background: #d8a151; display: grid; place-items: center; }
.card__media.is-brand img { height: auto; object-fit: contain; }
.project__cover.is-brand { background: #d8a151; margin: 0 calc(var(--pad) / 2); padding: 0; }
.project__cover.is-brand img { object-fit: contain; max-height: 80vh; }

.card--wide { grid-column: 1 / -1; }
.card--wide .card__media { aspect-ratio: 16 / 9; }

/* Statement */
.statement { padding-block: clamp(120px, 16vw, 240px); }
.statement__text {
  font-family: var(--serif); font-size: clamp(34px, 5vw, 76px); line-height: 1.04;
  letter-spacing: -.015em; max-width: 18ch;
}
.statement__text em { color: var(--muted); }

/* Lines */
.lines { padding-bottom: clamp(100px, 12vw, 180px); }
.lines__list { border-top: 1px solid var(--line); }
.line {
  display: grid; grid-template-columns: 80px 1fr 1fr; gap: 16px;
  padding: 28px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.line__num { color: var(--muted); font-size: 14px; }
.line h3 { font-weight: 500; font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -.02em; line-height: 1.1; }
.line p { color: var(--muted); max-width: 42ch; }

/* About */
.about { padding-bottom: clamp(100px, 12vw, 180px); }
.about__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 96px); align-items: start; }
.about__img { position: sticky; top: 90px; overflow: hidden; }
.about__img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__lead { font-size: clamp(24px, 2.6vw, 38px); line-height: 1.2; letter-spacing: -.02em; }
.about__body { margin-top: 28px; color: var(--muted); max-width: 56ch; display: grid; gap: 14px; }
.timeline li {
  display: grid; grid-template-columns: 64px 1fr; column-gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline span { color: var(--muted); font-size: 14px; grid-row: span 2; }
.timeline strong { font-weight: 500; }
.timeline em { font-family: var(--sans); font-style: normal; color: var(--muted); font-size: 15px; }

/* Footer */
.footer { background: var(--dark); color: #ece8e1; padding: clamp(96px, 12vw, 180px) 0 28px; }
.footer .eyebrow { color: #8e897f; }
.footer__title { font-weight: 500; font-size: clamp(34px, 5.6vw, 88px); line-height: 1; letter-spacing: -.04em; }
.footer__title em { color: #8e897f; }
.footer__links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: clamp(40px, 6vw, 80px); }
.big-link { font-size: clamp(20px, 2.4vw, 32px); border-bottom: 1px solid #4a4741; padding-bottom: 4px; transition: border-color .3s; }
.big-link:hover { border-color: #ece8e1; }
.big-link.is-pending { color: #d9745a; border-bottom-style: dashed; }
.footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(80px, 10vw, 160px); padding-top: 20px; border-top: 1px solid #2f2d29;
  font-size: 13px; color: #8e897f;
}

/* Project page */
.project__head { padding-top: 96px; padding-bottom: clamp(40px, 6vw, 80px); }
.back { font-size: 14px; color: var(--muted); display: inline-block; }
.project__title {
  font-weight: 500; font-size: clamp(56px, 11vw, 190px); line-height: .9;
  letter-spacing: -.055em; margin: 28px 0 clamp(32px, 5vw, 64px) -.04em;
}
.project__intro { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 5vw, 96px); align-items: start; }
.project__lead { font-size: clamp(22px, 2.4vw, 34px); line-height: 1.22; letter-spacing: -.02em; max-width: 26ch; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.project__cover { padding: 0 calc(var(--pad) / 2); }
.project__cover img { width: 100%; max-height: 92vh; object-fit: cover; cursor: zoom-in; }
.project__cover.is-drawing { background: #fff; margin: 0 calc(var(--pad) / 2); padding: clamp(24px, 6vw, 80px); }
.project__cover.is-drawing img { object-fit: contain; max-height: 80vh; margin-inline: auto; width: auto; }
.project__text {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 96px);
  padding-block: clamp(80px, 10vw, 160px);
}
.text-block h2 { font-size: 13px; font-weight: 400; color: var(--muted); margin-bottom: 16px; }
.text-block p { font-size: clamp(17px, 1.4vw, 20px); line-height: 1.55; max-width: 52ch; }

.gallery { columns: 2; column-gap: calc(var(--pad) / 2); padding: 0 calc(var(--pad) / 2); }
.gallery figure { break-inside: avoid; margin-bottom: calc(var(--pad) / 2); overflow: hidden; }
.gallery img { width: 100%; cursor: zoom-in; transition: transform 1.2s var(--ease); }
.gallery figure:hover img { transform: scale(1.02); }
.gallery--wide { columns: 1; max-width: 1200px; margin: 0 auto; }
.gallery--drawings { columns: 3; padding: 0; }
.gallery--drawings figure { background: #fff; padding: 6%; }

.series { padding-bottom: clamp(64px, 8vw, 120px); }
.series__head { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 5vw, 96px); padding: 32px 0; border-top: 1px solid var(--line); margin-bottom: 24px; }
.series__head h2 { font-weight: 500; font-size: clamp(32px, 4vw, 60px); letter-spacing: -.035em; line-height: 1; }
.series__head p { color: var(--muted); max-width: 52ch; font-size: clamp(16px, 1.3vw, 18px); }
.gallery--series { columns: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--pad) / 2); padding: 0; }
.gallery--series figure { margin: 0; }
.gallery--series img { aspect-ratio: 1 / 1; object-fit: cover; height: auto; }
figcaption { font-size: 13px; color: var(--muted); padding: 8px 2px 0; }
.project__cover figcaption { padding-inline: 4px; }
.series__head blockquote { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; color: var(--muted); max-width: 30ch; }

.next {
  display: block; padding: clamp(100px, 14vw, 220px) var(--pad) clamp(80px, 10vw, 140px);
}
.next .eyebrow { margin-bottom: 12px; }
.next__title {
  display: block; font-weight: 500; font-size: clamp(48px, 9vw, 150px); line-height: .92; letter-spacing: -.05em;
  transition: transform .6s var(--ease);
}
.next:hover .next__title { transform: translateX(12px); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(22, 21, 19, .96);
  display: grid; place-items: center; padding: 4vw; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 92vh; width: auto; height: auto; object-fit: contain; }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px;
  background: none; border: 0; color: #ece8e1; font-size: 44px; line-height: 1; cursor: pointer;
}
.lightbox__prev { left: 4px; }
.lightbox__next { right: 4px; }
.lightbox__close {
  position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #ece8e1;
  font-size: 36px; line-height: 1; cursor: pointer; padding: 8px; min-width: 48px; min-height: 48px; z-index: 1;
}

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .hero__line { opacity: 1; transform: none; transition: none; animation: none; }
  .card:hover .card__media img, .gallery figure:hover img { transform: none; }
}

/* Responsive */
@media (max-width: 900px) {
  .about__grid, .project__intro, .project__text, .series__head { grid-template-columns: 1fr; }
  .about__img { position: static; }
  .line { grid-template-columns: 48px 1fr; }
  .line p { grid-column: 2; }
  .gallery--drawings { columns: 2; }
  .gallery--series { grid-template-columns: repeat(2, 1fr); }
  .about__img { max-width: 520px; }
}
@media (max-width: 640px) {
  .card--wide .card__media { aspect-ratio: 4 / 5; }
  .nav { font-size: 13px; flex-wrap: wrap; row-gap: 4px; }
  .nav__links { gap: 14px; }
  .hero { padding-top: 96px; }
  .hero__row { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .gallery { columns: 1; }
  .gallery--drawings { columns: 2; }
  .facts div { grid-template-columns: 92px 1fr; }
}
