/* ============================================
   Barbara Pinete — Portfolio
   v2 — correcciones:
   1. sin tagline de disculpa
   2. grid parejo, tiles consistentes, escala a 5+ proyectos
   3. nombre de proyecto oculto hasta hover
   4. headline de concepto + contexto por proyecto
   5. paleta sin cambios (color real de las fotos, no B&N forzado)
   Un solo sistema tipográfico (sans), sin serif decorativo.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

@font-face {
  font-family: 'Jost';
  src: url('../fonts/Jost.ttf') format('truetype-variations'),
       url('../fonts/Jost.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #121212;
  --bone: #ffffff;
  --amber: #b8895a;
  --line: rgba(18, 18, 18, 0.12);
  --sans: 'Instrument Sans', Helvetica, Arial, sans-serif;
  --display: 'Jost', 'Instrument Sans', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem clamp(1.25rem, 4vw, 3rem);
  background: var(--bone);
  border-bottom: 1px solid var(--line);
}

.site-nav, .site-nav a { color: var(--ink); }

.wordmark {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.25rem);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-links a { position: relative; padding-bottom: 2px; }
.nav-links a:hover { opacity: 0.7; }

/* ---------- Home ---------- */

.home-intro {
  padding: 7.5rem clamp(1.25rem, 4vw, 3rem) 3rem;
  max-width: 640px;
}

.home-intro p {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 300;
  line-height: 1.3;
  margin: 0;
  letter-spacing: 0;
}

.home-main {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--bone);
  width: 100%;
}

.home-tile {
  position: relative;
  overflow: hidden;
  display: block;
  background: var(--ink);
  aspect-ratio: 3 / 4;
}

.home-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.home-tile:hover img,
.home-tile:focus-visible img { transform: scale(1.04); }

.home-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18,18,18,0.55), rgba(18,18,18,0) 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.home-tile:hover::after,
.home-tile:focus-visible::after { opacity: 1; }

.home-tile .tile-label,
.home-tile .tile-year {
  position: absolute;
  color: var(--bone);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.home-tile:hover .tile-label,
.home-tile:hover .tile-year,
.home-tile:focus-visible .tile-label,
.home-tile:focus-visible .tile-year {
  opacity: 1;
  transform: translateY(0);
}

.home-tile .tile-label {
  left: 1.1rem;
  bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-tile .tile-year {
  right: 1.1rem;
  top: 1rem;
  font-size: 0.72rem;
}

@media (max-width: 700px) {
  .home-grid { grid-template-columns: 1fr; }
}

@media (hover: none) {
  .home-tile::after { opacity: 1; background: linear-gradient(to top, rgba(18,18,18,0.5), rgba(18,18,18,0) 55%); }
  .home-tile .tile-label, .home-tile .tile-year { opacity: 1; transform: none; }
}

/* ---------- Project page ----------
   Structure borrowed directly from Alejandra's project pages:
   a left sidebar (title stays put while you scroll) and a right
   content column (concept headline, context, then the gallery).
   No image is ever force-cropped — each keeps its own ratio,
   so nothing gets cut down to nothing. */

.project-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(6rem, 10vw, 8rem) clamp(1.25rem, 4vw, 3rem) 5rem;
  align-items: start;
}

.project-sidebar {
  position: sticky;
  top: 5.5rem;
}

.project-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0;
  margin: 0 0 1.1rem;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: rgba(18,18,18,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.project-main { min-width: 0; }

.project-concept {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 1.75rem;
  max-width: 22ch;
}

.project-context {
  font-size: 1.02rem;
  max-width: 60ch;
  color: rgba(18,18,18,0.85);
  margin-bottom: 3rem;
}

.project-context p { margin: 0 0 1rem; }

.project-context blockquote {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  border-left: 2px solid var(--amber);
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  color: rgba(18,18,18,0.8);
}

.draft-note {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  color: var(--amber);
  border: 1px solid var(--amber);
  border-radius: 2px;
}

/* gallery: every image at its own natural ratio, never cropped */
.project-gallery {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.project-gallery figure { margin: 0; }
.project-gallery img { width: 100%; height: auto; display: block; }

.project-gallery figure.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.project-gallery figure.pair img { height: 100%; object-fit: cover; }

.project-gallery figure.small {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 860px) {
  .project-layout { grid-template-columns: 1fr; }
  .project-sidebar { position: static; }
  .project-gallery figure.pair { grid-template-columns: 1fr; }
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem clamp(1.25rem, 5vw, 2rem);
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
  margin-top: auto;
  font-size: 0.85rem;
}

.project-nav a { border-bottom: 1px solid var(--line); padding-bottom: 2px; }

/* ---------- About / footer ---------- */

.about-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(6rem, 10vw, 8rem) clamp(1.25rem, 5vw, 2rem) 5rem;
  align-items: start;
}

.about-photo {
  margin-top: 5rem;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 800px) {
  .about-layout { grid-template-columns: 1fr; }
  .about-photo { max-width: 280px; }
}

.about-page {
  max-width: 640px;
}

.about-page h1 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0;
  font-size: clamp(2.2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.about-page p { font-size: 1.05rem; margin-bottom: 1.2rem; }

.about-links {
  margin-top: 2.5rem;
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.about-links a { border-bottom: 1px solid var(--ink); }

.site-footer {
  margin-top: auto;
  padding: 2.5rem clamp(1.25rem, 5vw, 2rem);
  font-size: 0.78rem;
  color: rgba(18,18,18,0.55);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---------- Project credits ---------- */

.project-credits {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  max-width: 44ch;
}

.project-credits h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 1.1rem;
}

.project-credits dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1.5rem;
  margin: 0;
  font-size: 0.85rem;
}

.project-credits dt {
  color: rgba(18,18,18,0.5);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  padding-top: 0.1rem;
}

.project-credits dd {
  margin: 0;
  color: rgba(18,18,18,0.9);
}
